package com.cloudream.algorithm;

import android.graphics.Bitmap;

/**
 * Created by YZM on 2018/4/3.
 */

public class YUVImageTools {




    static{
        System.loadLibrary("yuvimagetool");
    }

    //public native Bitmap getYImage(String path, int width, int height, Bitmap.Config config);

    /**
     * 获取原始照片
     * @return
     */
    public native Bitmap getBGRImage(byte[] data, int width, int height,Bitmap.Config config);

    /*
    获取旋转270 度之后的照片
     */
    public native Bitmap getBGRImageWithRotation(byte[] data, int width, int height,Bitmap.Config config);
    //public native Bitmap getBGRAImage(String path,int width,int height,Bitmap.Config config);


    public native Bitmap getBGRImageWithRotation2(byte[] data,Bitmap bitmap,int width,int height);


    //   public native int getARGBImageWithRotation(byte[] data,Bitmap bitmap);



    public native byte[] yuvReduceWidth(byte[] yuvData,int widht,int height,int start);



    public native Bitmap getRotationBitmap(byte[] data,double rotation,int width,int height,Bitmap.Config config);

}
